<nav id="menu-left">
    <div class="divWrapAll">
        <a href="<?php echo $home ?>" class="divlogomn"><img src="catalog/view/theme/<?php echo $template; ?>/images/logo-mn.png"></a>
        <div class="btnmn clearfix">
            <a href="#" class="btnMenu">MENU</a>
            <a href="#" class="btnCate">KATEGORIER</a>
        </div>
        <ul class="ulMenu">
            <li class="<?php echo $active_menu == 2 ? 'nav-active' : '' ?>"><a href="<?php echo $manufacturer ?>">BRANDS</a></li>
            <li class="<?php echo $active_menu == 3 ? 'nav-active' : '' ?>"><a href="<?php echo $about_us ?>">OM HAVHØKEREN</a></li>
            <li class="<?php echo $active_menu == 4 ? 'nav-active' : '' ?>"><a href="<?php echo $term_cond ?>">HANDELSBETINGELSER</a></li>
            <li class="<?php echo $active_menu == 5 ? 'nav-active' : '' ?>"><a href="<?php echo $contact ?>">KONTAKT OS</a></li>
        </ul>
        <ul class="ulCate">
            <?php foreach($categories as $category){ ?>
                <li class="nav-left-active	<?php echo $category['active'] ? 'mm-opened' : '' ?>">
                    <a class="leftMenu" href="<?php echo $category['href'] ?>"><?php echo $category['name'] ?></a>

                    <?php if($category['children']){ ?>
                        <ul>
                            <?php foreach($category['children'] as $cat){ ?>
                                <li>
                                    <a class="leftMenu" href="<?php echo $cat['href'] ?>"><?php echo $cat['name'] ?></a>

                                    <?php if($cat['children']){ ?>
                                        <ul>
                                            <?php foreach($cat['children'] as $c){ ?>
                                                <li><a class="leftMenu" href="<?php echo $c['href'] ?>"><?php echo $c['name'] ?></a></li>
                                            <?php } ?>
                                        </ul>
                                    <?php } ?>
                                </li>
                            <?php } ?>
                        </ul>
                    <?php } ?>
                </li>
            <?php } ?>
        </ul>
    </div>
</nav>

<script type="text/javascript">
    $(document).ready(function(){
        $('.btnMenu').addClass("btnActive");
        $('.ulCate').hide();
        $('.ulMenu').show();

        $('.btnMenu').click(function(e){
            e.preventDefault();

            $(this).addClass("btnActive");
            $('.btnCate').removeClass("btnActive");
            $('.ulCate').hide();
            $('.ulMenu').show();
        });

        $('.btnCate').click(function(e){
            e.preventDefault();

            $(this).addClass("btnActive");
            $('.btnMenu').removeClass("btnActive");
            $('.ulCate').show();
            $('.ulMenu').hide();
        });
    });
</script>